Produced by Araxis Merge on 2023-07-12 04:42:38 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Porto v4.0.5/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/Controller/Adminhtml/Dailydeal | Edit.php | 2018-03-14 03:43:26 +0000 |
| 2 | Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/Controller/Adminhtml/Dailydeal | Edit.php | 2018-03-14 03:43:26 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 194 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | namespace Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal; | 2 | namespace Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal; | |||
| 3 | 3 | |||||
| 4 | class Edit extends \Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal | 4 | class Edit extends \Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal | |||
| 5 | { | 5 | { | |||
| 6 | /** | 6 | /** | |||
| 7 | * Backend session | 7 | * Backend session | |||
| 8 | * | 8 | * | |||
| 9 | * @var \Magento\Backend\Model\Session | 9 | * @var \Magento\Backend\Model\Session | |||
| 10 | */ | 10 | */ | |||
| 11 | protected $backendSession; | 11 | protected $backendSession; | |||
| 12 | 12 | |||||
| 13 | /** | 13 | /** | |||
| 14 | * Page factory | 14 | * Page factory | |||
| 15 | * | 15 | * | |||
| 16 | * @var \Magento\Framework\View\Result\PageFactory | 16 | * @var \Magento\Framework\View\Result\PageFactory | |||
| 17 | */ | 17 | */ | |||
| 18 | protected $resultPageFactory; | 18 | protected $resultPageFactory; | |||
| 19 | 19 | |||||
| 20 | /** | 20 | /** | |||
| 21 | * Result JSON factory | 21 | * Result JSON factory | |||
| 22 | * | 22 | * | |||
| 23 | * @var \Magento\Framework\Controller\Result\JsonFactory | 23 | * @var \Magento\Framework\Controller\Result\JsonFactory | |||
| 24 | */ | 24 | */ | |||
| 25 | protected $resultJsonFactory; | 25 | protected $resultJsonFactory; | |||
| 26 | 26 | |||||
| 27 | /** | 27 | /** | |||
| 28 | * constructor | 28 | * constructor | |||
| 29 | * | 29 | * | |||
| 30 | * @param \Magento\Backend\Model\Session $backendSession | 30 | * @param \Magento\Backend\Model\Session $backendSession | |||
| 31 | * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory | 31 | * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory | |||
| 32 | * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory | 32 | * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory | |||
| 33 | * @param \Smartwave\Dailydeals\Model\DailydealFactory $dailydealFactory | 33 | * @param \Smartwave\Dailydeals\Model\DailydealFactory $dailydealFactory | |||
| 34 | * @param \Magento\Framework\Registry $registry | 34 | * @param \Magento\Framework\Registry $registry | |||
| 35 | * @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory | 35 | * @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory | |||
| 36 | * @param \Magento\Backend\App\Action\Context $context | 36 | * @param \Magento\Backend\App\Action\Context $context | |||
| 37 | */ | 37 | */ | |||
| 38 | public function __construct( | 38 | public function __construct( | |||
| 39 | \Magento\Framework\View\Result\PageFactory $resultPageFactory, | 39 | \Magento\Framework\View\Result\PageFactory $resultPageFactory, | |||
| 40 | \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, | 40 | \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, | |||
| 41 | \Smartwave\Dailydeals\Model\DailydealFactory $dailydealFactory, | 41 | \Smartwave\Dailydeals\Model\DailydealFactory $dailydealFactory, | |||
| 42 | \Magento\Framework\Registry $registry, | 42 | \Magento\Framework\Registry $registry, | |||
| 43 | \Magento\Backend\App\Action\Context $context | 43 | \Magento\Backend\App\Action\Context $context | |||
| 44 | ) { | 44 | ) { | |||
| 45 | 45 | |||||
| 46 | $this->backendSession = $context->getSession(); | 46 | $this->backendSession = $context->getSession(); | |||
| 47 | $this->resultPageFactory = $resultPageFactory; | 47 | $this->resultPageFactory = $resultPageFactory; | |||
| 48 | $this->resultJsonFactory = $resultJsonFactory; | 48 | $this->resultJsonFactory = $resultJsonFactory; | |||
| 49 | parent::__construct($dailydealFactory, $registry, $context); | 49 | parent::__construct($dailydealFactory, $registry, $context); | |||
| 50 | } | 50 | } | |||
| 51 | 51 | |||||
| 52 | /** | 52 | /** | |||
| 53 | * is action allowed | 53 | * is action allowed | |||
| 54 | * | 54 | * | |||
| 55 | * @return bool | 55 | * @return bool | |||
| 56 | */ | 56 | */ | |||
| 57 | protected function _isAllowed() | 57 | protected function _isAllowed() | |||
| 58 | { | 58 | { | |||
| 59 | return $this->_authorization->isAllowed('Smartwave_Dailydeals::dailydeal'); | 59 | return $this->_authorization->isAllowed('Smartwave_Dailydeals::dailydeal'); | |||
| 60 | } | 60 | } | |||
| 61 | 61 | |||||
| 62 | /** | 62 | /** | |||
| 63 | * @return \Magento\Backend\Model\View\Result\Page|\Magento\Backend\Model\View\Result\Redirect|\Magento\Framework\View\Result\Page | 63 | * @return \Magento\Backend\Model\View\Result\Page|\Magento\Backend\Model\View\Result\Redirect|\Magento\Framework\View\Result\Page | |||
| 64 | */ | 64 | */ | |||
| 65 | public function execute() | 65 | public function execute() | |||
| 66 | { | 66 | { | |||
| 67 | $id = $this->getRequest()->getParam('dailydeal_id'); | 67 | $id = $this->getRequest()->getParam('dailydeal_id'); | |||
| 68 | /** @var \Smartwave\Dailydeals\Model\Dailydeal $dailydeal */ | 68 | /** @var \Smartwave\Dailydeals\Model\Dailydeal $dailydeal */ | |||
| 69 | $dailydeal = $this->initDailydeal(); | 69 | $dailydeal = $this->initDailydeal(); | |||
| 70 | /** @var \Magento\Backend\Model\View\Result\Page|\Magento\Framework\View\Result\Page $resultPage */ | 70 | /** @var \Magento\Backend\Model\View\Result\Page|\Magento\Framework\View\Result\Page $resultPage */ | |||
| 71 | $resultPage = $this->resultPageFactory->create(); | 71 | $resultPage = $this->resultPageFactory->create(); | |||
| 72 | $resultPage->setActiveMenu('Smartwave_Dailydeals::dailydeal'); | 72 | $resultPage->setActiveMenu('Smartwave_Dailydeals::dailydeal'); | |||
| 73 | $resultPage->getConfig()->getTitle()->set(__('Dailydeals')); | 73 | $resultPage->getConfig()->getTitle()->set(__('Dailydeals')); | |||
| 74 | if ($id) { | 74 | if ($id) { | |||
| 75 | $dailydeal->load($id); | 75 | $dailydeal->load($id); | |||
| 76 | if (!$dailydeal->getId()) { | 76 | if (!$dailydeal->getId()) { | |||
| 77 | $this->messageManager->addError(__('This Dailydeal no longer exists.')); | 77 | $this->messageManager->addError(__('This Dailydeal no longer exists.')); | |||
| 78 | $resultRedirect = $this->resultRedirectFactory->create(); | 78 | $resultRedirect = $this->resultRedirectFactory->create(); | |||
| 79 | $resultRedirect->setPath( | 79 | $resultRedirect->setPath( | |||
| 80 | 'sw_dailydeals/*/edit', | 80 | 'sw_dailydeals/*/edit', | |||
| 81 | [ | 81 | [ | |||
| 82 | 'dailydeal_id' => $dailydeal->getId(), | 82 | 'dailydeal_id' => $dailydeal->getId(), | |||
| 83 | '_current' => true | 83 | '_current' => true | |||
| 84 | ] | 84 | ] | |||
| 85 | ); | 85 | ); | |||
| 86 | return $resultRedirect; | 86 | return $resultRedirect; | |||
| 87 | } | 87 | } | |||
| 88 | } | 88 | } | |||
| 89 | $title = $dailydeal->getId() ? $dailydeal->getSw_product_sku() : __('New Dailydeal'); | 89 | $title = $dailydeal->getId() ? $dailydeal->getSw_product_sku() : __('New Dailydeal'); | |||
| 90 | $resultPage->getConfig()->getTitle()->prepend($title); | 90 | $resultPage->getConfig()->getTitle()->prepend($title); | |||
| 91 | $data = $this->backendSession->getData('sw_dailydeals_dailydeal_data', true); | 91 | $data = $this->backendSession->getData('sw_dailydeals_dailydeal_data', true); | |||
| 92 | if (!empty($data)) { | 92 | if (!empty($data)) { | |||
| 93 | $dailydeal->setData($data); | 93 | $dailydeal->setData($data); | |||
| 94 | } | 94 | } | |||
| 95 | return $resultPage; | 95 | return $resultPage; | |||
| 96 | } | 96 | } | |||
| 97 | } | 97 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.